//
//  BulkViewController.m
//  计算面积、体积
//
//  Created by student on 16/2/22.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "BulkViewController.h"

@interface BulkViewController ()
@property (weak, nonatomic) IBOutlet UITextField *length;
@property (weak, nonatomic) IBOutlet UITextField *width;
@property (weak, nonatomic) IBOutlet UITextField *heigth;
@property (weak, nonatomic) IBOutlet UITextField *rectVolume;
@property (weak, nonatomic) IBOutlet UITextField *radius;
@property (weak, nonatomic) IBOutlet UITextField *circleVolume;

@end

@implementation BulkViewController
- (IBAction)calculationVolume:(id)sender {
    float rectVolume=[self.length.text floatValue]*[self.width.text floatValue]*[self.heigth.text floatValue];
    self.rectVolume.text=[NSString stringWithFormat:@"%.2f",rectVolume];
    
    float circleVolume=[self.radius.text floatValue]*[self.radius.text floatValue]*[self.radius.text floatValue]*M_PI;
    self.circleVolume.text=[NSString stringWithFormat:@"%.2f",circleVolume];
    
    self.summaryVC.calCount++;
}
- (IBAction)backTap:(id)sender {
    [self.view endEditing:YES];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
